<template>
  <section class="ling-top-text progress_report_wrap">
    <h2>进度汇报</h2>
    <div v-if="userList">
      <div
        class="progress-report"
        @click="$router.push(`/reportList/${item.userJobId}`)"
        v-for="item in userList"
        :key="item.userJobId"
      >
        <div class="name">{{ item.userDetailResponse.name }}</div>
        <div class="ling-flex">
          <div class="detail">
            <div class="status">当前状态：{{ item.userJobStatusDesc }}</div>
            <div class="update_num">已上传：{{ item.reportCount }}</div>
          </div>
          <van-icon name="arrow" class="icon" />
        </div>
      </div>
    </div>
  </section>
</template>

<script>
import { createNamespacedHelpers } from 'vuex'
const { mapState, mapActions } = createNamespacedHelpers('myData')
export default {
  name: 'Homepage',
  data() {
    return {}
  },
  components: {},
  computed: {
    ...mapState(['userList']),
  },
  created() {
    // this.getUserList(this.$route.params.jobId)
  },
  methods: {
    ...mapActions(['getUserList']),
  },
}
</script>

<style lang="less" scoped>
.progress_report_wrap {
  background: #f5f5f5;
  .progress-report {
    background: white;
    padding: 5px 20px;
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    line-height: 25px;
    .name {
      font-size: 14px;
      color: #333;
      display: flex;
      align-items: center;
    }
    .detail {
      display: flex;
      flex-direction: column;
      justify-content: center;
      font-size: 10px;
      color: #666;
      text-align: right;
      .update_num {
      }
    }
    .icon {
      font-size: 10px;
      color: #666666;
      margin-left: 5px;
    }
  }
}
</style>
